#include "stm32f10x.h"                  // Device header
#include "stdint.h"
#include "Delay.h"
#include "Lightsensor.h"


void Lightsensor_Init(void)
{
	RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB, ENABLE);
	
	GPIO_InitTypeDef gpioInitStruture;
	gpioInitStruture.GPIO_Mode = GPIO_Mode_IPU;
	gpioInitStruture.GPIO_Pin = GPIO_Pin_13;
	gpioInitStruture.GPIO_Speed = GPIO_Speed_50MHz;
	GPIO_Init(GPIOB, &gpioInitStruture);
	
}

uint8_t Lighsensor_Get(void)
{
	return GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_13);
}

